package com.shensi.appCollect.dao;


import com.shensi.api.admin.domian.station.ClassSettlement;
import com.shensi.api.admin.domian.station.ClassSettlementOilmachine;
import com.shensi.appCollect.pojo.*;
import com.shensi.appCollect.pojo.dto.OilEngineDto;
import com.shensi.appCollect.pojo.vo.changeClassSettlement4User;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 班结Mapper接口
 *
 * @author qujia
 * @date 2021-11-27
 */
public interface ClassSettlementMapper
{


    /**
     * 查询班结汇总列表
     *
     * @param classSettlement 班结
     * @return 班结集合
     */
    public List<ClassSettlement> selectClassSettlementSummaryList(ClassSettlement classSettlement);

    public List<ClassSettlement> selectClassSettlementStaffSummaryList(ClassSettlement classSettlement);

    public List<ClassSettlement> selectClassSettlementSummary4POSList(Map<String, Object> params);
    public List<ClassSettlement> selectClassSettlement4User4POSList(Map<String, Object> params);

    public List<ClassSettlementOilmachine> selectAllClassSettlementOilmachines(String classNo);
    public int insertClassSettlementOilmachine(ClassSettlementOilmachine classSettlementOilmachine);

    public ClassSettlement queryPhysicalCard(Map<String, Object> params);

    public ClassSettlementCard forKillCouponAmt(Map<String, Object> params);

    public ClassSettlement queryFleetCard(Map<String, Object> params);

    public ClassSettlement querySuperPay(Map<String, Object> params);

    public List<changeClassSettlement4User> selectChange4User4POSListForOrder(Map<String, Object> params);

    List<OilOmeter> selectByStationId(Long StationId);

    public  int insertAboutOilEngine(List<Map<String, Object>> queryGroupByOilGun);

    int insertSelective(OilOmeter record);

    public int addChange4User4POSListForOrder(changeClassSettlement4User changeClassSettlement4User);

    /**
     * 新增班结
     *
     * @param classSettlement 班结
     * @return 结果
     */
    public int insertClassSettlement(ClassSettlement classSettlement);

    public String queryClassDayOrNight(Map<String, Object> params);

    public SysUser lastTimeByUserId(String params);

    public  List<Map<String, Object>> queryGroupByOilGunForOrder(Map<String, Object> params);

    public  List<OilEngineDto> classSettlementOilEngineSum(Map<String, Object> params);

    public List<ClassSettlement> queryUntreatedData(Map<String, Object> params);
    /***
     * 充值合计(包括退款)
     * @param params
     * @return
     */
    BigDecimal getTotalAmtByConditions(Map<String, Object> params);

    BigDecimal getTotalPresentAmtByConditions(Map<String, Object> params);
    /**
     * 查询通联支付的订单信息
     *
     * @param params
     * @return 结果
     */
    public List<ClassSettlement> queryPayWayData(Map<String, Object> params);
    /**
     * 查询最近的班结信息
     *
     * @param classSettlement
     * @return 结果
     */
    public ClassSettlement QueryMaxClass(ClassSettlement classSettlement);

    public Map<String,Object> queryLastEndTime(Map<String, Object> params);

    public Map<String,Object> queryLastEndTimeStaff(Map<String, Object> params);

    public List<Map<String,Object>> queryGroupByPayType(Map<String,Object> params);

    public List<Map<String,Object>> queryGroupByUser(Map<String,Object> params);

    List<ClassSettlement> querySummaryByClassNo(Map<String,Object> params);

    List<String> queryClassNoByPayDate(@Param("stationId") Integer stationId, @Param("payDate") Date payDate);

    int updateClassSettlementStatus(@Param("classNo") String classNo);

    ClassSettlementCard queryPhysicalCardInXj(Map<String, Object> params);

    ClassSettlementCard queryPhysicalCardInWxPos(Map<String, Object> params);

    ClassSettlementCard queryPhysicalCardInRef(Map<String, Object> params);

}
